package com.finace.money.data;

import com.finace.money.common.Constant;
import com.finace.money.common.util.ParamUtil;
import com.finace.money.data.bean.BannerBean;
import com.finace.money.data.bean.BaseBean;
import com.finace.money.data.http.ApiService;
import com.finace.money.presenter.contract.MainHomeContract;

import java.util.TreeMap;

import io.reactivex.Observable;

/**
 * Created by zhangpeng on 2017/12/8.
 */

public class MainHomeModel implements MainHomeContract.IMainHomeModel {

    private ApiService mApiService;
    public MainHomeModel(ApiService apiService) {
        this.mApiService = apiService;
    }

    @Override
    public Observable<BaseBean<BannerBean>> getBanner() {

        return mApiService.getBanner(Constant.bannerInterface, ParamUtil.getParma(new TreeMap<String, String>()));
    }
}
